package com.zp.drug.entity.bo;

import com.zp.common.core.entity.BaseEntity;
import com.zp.common.core.validate.AddGroup;
import com.zp.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 药品库存流转记录业务对象
 *
 * @author zhang peng
 * @ date 2023-10-31
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class DrugStockAllLogBo extends BaseEntity {

    /**
     * 主键
     */
    @NotBlank(message = "主键不能为空", groups = {EditGroup.class})
    private String id;

    /**
     * 门诊号
     */
    private String clinicNo;

    /**
     * 住院号
     */
    private String hospitalNo;

    /**
     * 单号
     */
    private String documentNo;

    /**
     * 1.门诊处方 2.住院处方 3.摆药 4.住院退药 5.入库 6.出库 7.盘点 8.科室扣减 9.门诊处方退药 10.手术室用药（药房发药）
     */
    @NotBlank(message = "1.门诊处方 2.住院处方 3.摆药 4.住院退药 5.入库 6.出库 7.盘点 8.科室扣减 9.门诊处方退药 10.手术室用药（药房发药）不能为空", groups = {AddGroup.class, EditGroup.class})
    private String recordType;

    /**
     * 来源类型
     */
    private String sourceType;

    /**
     * 药品ID
     */
    @NotBlank(message = "药品ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugInfoId;

    /**
     * 库存id
     */
    private String stockId;

    /**
     * 药品类别
     */
    @NotBlank(message = "药品类别不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugType;

    /**
     * 药品剂型
     */
    @NotBlank(message = "药品剂型不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugFrom;

    /**
     * 药品分类
     */
    @NotBlank(message = "药品分类不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugClass;

    /**
     * 药品名称
     */
    @NotBlank(message = "药品名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugName;

    /**
     * 药品机构编码
     */
    @NotBlank(message = "药品机构编码不能为空", groups = {AddGroup.class, EditGroup.class})
    private String drugCode;

    /**
     * 药品系统编码
     */
    private String sysDrugCode;

    /**
     * 药品拼音码
     */
    private String drugInput;

    /**
     * 规格
     */
    @NotBlank(message = "规格不能为空", groups = {AddGroup.class, EditGroup.class})
    private String spec;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空", groups = {AddGroup.class, EditGroup.class})
    private String units;

    /**
     * 厂商名称
     */
    private String firmName;

    /**
     * 包装数量
     */
    @NotNull(message = "包装数量不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer packageNum;

    /**
     * 价表
     */
    private String priceId;

    /**
     * 大小包装
     */
    @NotBlank(message = "大小包装不能为空", groups = {AddGroup.class, EditGroup.class})
    private String packSize;

    /**
     * 数量
     */
    @NotNull(message = "数量不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer amount;

    /**
     * 现行数量
     */
    private Integer currentAmount;

    /**
     * 单价
     */
    @NotNull(message = "单价不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal itemPrice;

    /**
     * 进价
     */
    private BigDecimal tradePrice;

    /**
     * 网络销售价格
     */
    private BigDecimal networkPrice;

    /**
     * 总额
     */
    @NotNull(message = "总额不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal costs;

    /**
     * 收费系数
     */
    private BigDecimal priceQuotiety;

    /**
     * 申请科室(领取科室)
     */
    private String applyDept;

    /**
     * 申请人(领取人)
     */
    private String applyPerson;

    /**
     * 记录科室(发放科室)
     */
    private String recordDept;

    /**
     * 记录人(发放人)
     */
    private String recordPerson;

    /**
     * 领用人
     */
    private String usePerson;

    /**
     * 机构ID
     */
    private String orgId;

    /**
     * 备注
     */
    private String remarks;


    /**
     * 处方明细表id
     */
    private String prescriptionItemId;


}
